<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html class=" js csstransforms3d"><head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>文章发布</title>
	<link rel="stylesheet" href="/test/Public/css/base.css">
	<link rel="stylesheet" href="/test/Public/css/page.css">
	<!--[if lte IE 8]>
	<link href="css/ie8.css" rel="stylesheet" type="text/css"/>
	<![endif]-->
	<script type="text/javascript" src="/test/Public/js/jquery.min.js"></script>
	<script type="text/javascript" src="/test/Public/js/main.js"></script>
	<script type="text/javascript" src="/test/Public/js/modernizr.js"></script>
	<!--[if IE]>
	<script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
	<![endif]-->
</head>

<body style="background: #f6f5fa;">

	<!--content S-->
	<div class="super-content RightMain" id="RightMain">
		
		<!--header-->
		<div class="superCtab">
			<div class="ctab-title clearfix"><h3>文章发布</h3></div>
			
			<div class="ctab-Main">
				<div class="ctab-Main-title">
					<ul class="clearfix">
						<li><a href="wenzhang_xinwen.html">大师列表</a></li>
						<li><a href="wenzhang_pinshang.html">课程列表</a></li>
						<li class="cur"><a href="wenzhang_zhuoyue.html">问答列表</a></li>
						
					</ul>
				</div>
				
				<div class="ctab-Mian-cont">
					<div class="Mian-cont-btn clearfix">
						<div class="operateBtn">
							<a href="wenzhang_xinwen_fabu.html" class="greenbtn publish">添加大师</a>
							
						</div>
						<div class="searchBar">
							<input type="text" id="" value="" class="form-control srhTxt" placeholder="输入标题关键字搜索">
							<input type="button" class="srhBtn" value="">
						</div>
					</div>
					
					<div class="Mian-cont-wrap">
						<div class="defaultTab-T">
							<table border="0" cellspacing="0" cellpadding="0" class="defaultTable">
								<tbody><tr><th class="t_1">文章ID</th><th class="t_2">文章标题</th><th class="t_3">发布时间</th><th class="t_4">操作</th></tr>
							</tbody></table>
						</div>
						<table border="0" cellspacing="0" cellpadding="0" class="defaultTable defaultTable2">
							<tbody><tr>
								<td class="t_1">20150084</td>
								<td class="t_2"><a href="#">平安好医生与平安银行开启全面战略合作</a></td>
								<td class="t_3">2015-12-01</td>
								<td class="t_4"><div class="btn"><a class="Top">置顶</a><a href="#" class="modify">修改</a><a href="#" class="delete">删除</a></div></td>
							</tr>
							<tr>
								<td class="t_1">20150084</td>
								<td class="t_2"><a href="#">平安好医生与平安银行开启全面战略合作</a></td>
								<td class="t_3">2015-12-01</td>
								<td class="t_4"><div class="btn"><a class="Top">置顶</a><a href="#" class="modify">修改</a><a href="#" class="delete">删除</a></div></td>
							</tr>
							<tr>
								<td class="t_1">20150084</td>
								<td class="t_2"><a href="#">平安好医生与平安银行开启全面战略合作</a></td>
								<td class="t_3">2015-12-01</td>
								<td class="t_4"><div class="btn"><a class="Top">置顶</a><a href="#" class="modify">修改</a><a href="#" class="delete">删除</a></div></td>
							</tr>
							<tr>
								<td class="t_1">20150084</td>
								<td class="t_2"><a href="#">平安好医生与平安银行开启全面战略合作</a></td>
								<td class="t_3">2015-12-01</td>
								<td class="t_4"><div class="btn"><a class="Top">置顶</a><a href="#" class="mmodify">修改</a><a href="#" class="delete">删除</a></div></td>
							</tr>
							<tr>
								<td class="t_1">20150084</td>
								<td class="t_2"><a href="#">平安好医生与平安银行开启全面战略合作</a></td>
								<td class="t_3">2015-12-01</td>
								<td class="t_4"><div class="btn"><a class="Top">置顶</a><a href="#" class="mmodify">修改</a><a href="#" class="delete">删除</a></div></td>
							</tr>
							<tr>
								<td class="t_1">20150084</td>
								<td class="t_2"><a href="#">平安好医生与平安银行开启全面战略合作</a></td>
								<td class="t_3">2015-12-01</td>
								<td class="t_4"><div class="btn"><a class="Top">置顶</a><a href="#" class="mmodify">修改</a><a href="#" class="delete">删除</a></div></td>
							</tr>
						</tbody></table>
						<!--pages S-->
						<div class="pageSelect">
							<span>共 <b>188</b> 条 每页 <b>10 </b>条   1/18</span>
							<div class="pageWrap">
								<a class="pagePre"><i class="ico-pre">&nbsp;</i></a>
								<a href="#" class="pagenumb cur">1</a>
								<a href="#" class="pagenumb">2</a>
								<a href="#" class="pagenumb">3</a>
								<a href="#" class="pagenext"><i class="ico-next">&nbsp;</i></a>
							</div>
						</div>
						<!--pages E-->
					</div>
				
				</div>
			</div>
		</div>
		<!--main-->
		
	</div>
	<!--content E-->
	
	<div class="layuiBg"></div><!--公共遮罩-->


<script type="text/javascript" src="js/zxxFile.js"></script>
<script>
var params = {
	fileInput: $("#fileImage").get(0),
	upButton: $("#fileSubmit").get(0),
	url: $("#uploadForm").attr("action"),
	filter: function(files) {
		var arrFiles = [];
		for (var i = 0, file; file = files[i]; i++) {
			if (file.type.indexOf("image") == 0) {
				if (file.size >= 512000) {
					alert('您这张"'+ file.name +'"图片大小过大，应小于500k');	
				} else {
					arrFiles.push(file);	
				}			
			} else {
				alert('文件"' + file.name + '"不是图片。');	
			}
		}
		return arrFiles;
	},
	onSelect: function(files) {
		var html = '', i = 0;
		$("#preview").html('<div class="upload_loading"></div>');
		var funAppendImage = function() {
			file = files[i];
			if (file) {
				var reader = new FileReader()
				reader.onload = function(e) {
					$('.XgfileImg img').attr('src', e.target.result);
					$('.sp-photo').addClass('cur');
					html = html + '<div id="uploadList_'+ i +'" class="upload_append_list"><p><span>' + file.name + '</span>'+ 
						'<a href="javascript:" class="upload_delete" title="删除" data-index="'+ i +'">删除</a>' +
					'</div>';
					
					i++;
					funAppendImage();
				}
				reader.readAsDataURL(file);
			} else {
				$("#preview").html(html);
				if (html) {
					//删除方法
					$(".upload_delete").click(function() {
						ZXXFILE.funDeleteFile(files[parseInt($(this).attr("data-index"))]);
						$('.sp-photo').removeClass('cur').html('栏目图片');
						return false;	
					});
					//提交按钮显示
					$("#fileSubmit").show();	
				} else {
					//提交按钮隐藏
					$("#fileSubmit").hide();	
				}
			}
		};
		funAppendImage();		
	},
	onDelete: function(file) {
		$("#uploadList_" + file.index).fadeOut();
	},
	onDragOver: function() {
		$(this).addClass("upload_drag_hover");
	},
	onDragLeave: function() {
		$(this).removeClass("upload_drag_hover");
	},
	onProgress: function(file, loaded, total) {
		var eleProgress = $("#uploadProgress_" + file.index), percent = (loaded / total * 100).toFixed(2) + '%';
		eleProgress.show().html(percent);
	},
	onSuccess: function(file, response) {
		$("#uploadInf").append("<p>上传成功，图片地址是：" + response + "</p>");
	},
	onFailure: function(file) {
		$("#uploadInf").append("<p>图片" + file.name + "上传失败！</p>");	
		$("#uploadImage_" + file.index).css("opacity", 0.2);
	},
	onComplete: function() {
		//提交按钮隐藏
		$("#fileSubmit").hide();
		//file控件value置空
		$("#fileImage").val("");
		$("#uploadInf").append("<p>当前图片全部上传完毕，可继续添加上传。</p>");
	}
};
ZXXFILE = $.extend(ZXXFILE, params);
ZXXFILE.init();

</script>

</body></html>